import req from '../utils/axiosUtil'
import {API_HOST} from '../settings'


//按商家ID和用户ID查询购物车商品
export async function getShoppingCartInfo(params) {
  return req.post(`${API_HOST}/app/shoppingCart/getShoppingCartInfo`, {
    ...params
  })
}

//添加购物车
export async function addShoppingCart(params) {
  return req.post(`${API_HOST}/app/shoppingCart/addShoppingCart`, {
    ...params
  })
}

//删除购物车
export async function deleteShoppingCart(params) {
  return req.post(`${API_HOST}/app/shoppingCart/deleteShoppingCart`, {
    ...params
  })
}

//批量修改购物车
export async function saveShoppingCart(params){
  return req.post(`${API_HOST}/app/shoppingCart/saveShoppingCart`, {
    ...params
  })
}

//查询购物车数量
export async function getCount(params) {
  return req.post(`${API_HOST}/app/shoppingCart/getCount`, {
    ...params
  })
}

//获取商家配送费信息
export async function getInfoByIdApp(params){
  return req.post(`${API_HOST}/app/deliveryFee/getDeliveryFeeInfoApp`,{
    ...params
  })
}

//获取商家是否在配送时间内
export async function getBusinessReceiveStatus(params){
  return req.post(`${API_HOST}/app/business/getBusinessReceiveStatus`,{
    ...params
  })
}